package com.cwl.base.day03;

/**
 * @program: java_base
 * @description: 测试静态初始化块的使用
 * @author: ChenWenLong
 * @create: 2019-11-07 09:35
 **/
public class User3 {

    int id;        //id
    String name;   //账户名
    String pwd;   //密码
    static String company; //公司名称

    static {
        System.out.println("执行类的初始化工作");
        company = "****";
        printCompany();
    }

    public static void printCompany(){
        System.out.println(company);
    }

    public static void main(String[] args) {
        User3  u3 = null;
    }
}
